package oa.hleast.xswl.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 退款售后状态枚举
 *
 * @author 302
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum RefundAndAfterSaleEnum {
    /**
     * 仅退款
     */
    ONLY_REFUND(1, "我要退款（无需退货）", "仅退款", "没收到货，或是虚拟商品，或卖家同意不用退货只退款", "http://ayxh-rc.100dp.com/images/global/refund_and_return.png"),
    /**
     * 退款退货
     */
    REFUND_AND_GOODS(2, "我要退货退款", "退货退款", "已收到货，需要退还收到的货物", "http://ayxh-rc.100dp.com/images/global/refund.png");

    private Integer code;
    private String title;
    private String name;
    private String depict;
    private String logoUrl;

    public static RefundAndAfterSaleEnum getValue(Integer code) {
        for (RefundAndAfterSaleEnum value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
